// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * DownloadableLink generated by hbm2java
 */
@Entity
@Table(name = "downloadable_link", catalog = "magento")
public class DownloadableLink implements java.io.Serializable {

	private Integer linkId;
	private CatalogProductEntity catalogProductEntity;
	private int sortOrder;
	private Integer numberOfDownloads;
	private short isShareable;
	private String linkUrl;
	private String linkFile;
	private String linkType;
	private String sampleUrl;
	private String sampleFile;
	private String sampleType;
	private Set downloadableLinkTitles = new HashSet(0);
	private Set downloadableLinkPrices = new HashSet(0);

	public DownloadableLink() {
	}

	public DownloadableLink(CatalogProductEntity catalogProductEntity,
			int sortOrder, short isShareable) {
		this.catalogProductEntity = catalogProductEntity;
		this.sortOrder = sortOrder;
		this.isShareable = isShareable;
	}

	public DownloadableLink(CatalogProductEntity catalogProductEntity,
			int sortOrder, Integer numberOfDownloads, short isShareable,
			String linkUrl, String linkFile, String linkType, String sampleUrl,
			String sampleFile, String sampleType, Set downloadableLinkTitles,
			Set downloadableLinkPrices) {
		this.catalogProductEntity = catalogProductEntity;
		this.sortOrder = sortOrder;
		this.numberOfDownloads = numberOfDownloads;
		this.isShareable = isShareable;
		this.linkUrl = linkUrl;
		this.linkFile = linkFile;
		this.linkType = linkType;
		this.sampleUrl = sampleUrl;
		this.sampleFile = sampleFile;
		this.sampleType = sampleType;
		this.downloadableLinkTitles = downloadableLinkTitles;
		this.downloadableLinkPrices = downloadableLinkPrices;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "link_id", unique = true, nullable = false)
	public Integer getLinkId() {
		return this.linkId;
	}

	public void setLinkId(Integer linkId) {
		this.linkId = linkId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@Column(name = "number_of_downloads")
	public Integer getNumberOfDownloads() {
		return this.numberOfDownloads;
	}

	public void setNumberOfDownloads(Integer numberOfDownloads) {
		this.numberOfDownloads = numberOfDownloads;
	}

	@Column(name = "is_shareable", nullable = false)
	public short getIsShareable() {
		return this.isShareable;
	}

	public void setIsShareable(short isShareable) {
		this.isShareable = isShareable;
	}

	@Column(name = "link_url")
	public String getLinkUrl() {
		return this.linkUrl;
	}

	public void setLinkUrl(String linkUrl) {
		this.linkUrl = linkUrl;
	}

	@Column(name = "link_file")
	public String getLinkFile() {
		return this.linkFile;
	}

	public void setLinkFile(String linkFile) {
		this.linkFile = linkFile;
	}

	@Column(name = "link_type", length = 20)
	public String getLinkType() {
		return this.linkType;
	}

	public void setLinkType(String linkType) {
		this.linkType = linkType;
	}

	@Column(name = "sample_url")
	public String getSampleUrl() {
		return this.sampleUrl;
	}

	public void setSampleUrl(String sampleUrl) {
		this.sampleUrl = sampleUrl;
	}

	@Column(name = "sample_file")
	public String getSampleFile() {
		return this.sampleFile;
	}

	public void setSampleFile(String sampleFile) {
		this.sampleFile = sampleFile;
	}

	@Column(name = "sample_type", length = 20)
	public String getSampleType() {
		return this.sampleType;
	}

	public void setSampleType(String sampleType) {
		this.sampleType = sampleType;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "downloadableLink")
	public Set getDownloadableLinkTitles() {
		return this.downloadableLinkTitles;
	}

	public void setDownloadableLinkTitles(Set downloadableLinkTitles) {
		this.downloadableLinkTitles = downloadableLinkTitles;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "downloadableLink")
	public Set getDownloadableLinkPrices() {
		return this.downloadableLinkPrices;
	}

	public void setDownloadableLinkPrices(Set downloadableLinkPrices) {
		this.downloadableLinkPrices = downloadableLinkPrices;
	}

}
